package cn.uhua.erp.pms.common.repository;

import java.util.Set;

import org.springframework.data.jpa.repository.JpaRepository;

import cn.uhua.erp.pms.common.model.Authority;
import cn.uhua.erp.pms.common.model.AuthorityId;

public interface AuthorityRepository extends JpaRepository<Authority, AuthorityId> {
    // 根据用户名查询所有权限
    Set<Authority> findByUserUsername(String username);
    
    // 根据用户名删除所有权限
    void deleteByUserUsername(String username);
}